To increase the capacity of a memory, a three-dimensional memory of the spin shift register type using the movement of a magnetic domain wall has been proposed. Such a three-dimensional memory includes a magnetic section shaped like a narrow wire, a read section, and a write section. Magnetic domains corresponding to recording bits are arranged in the magnetic section. The magnetic domain is shifted on the magnetic section by e.g. current. Stable operation is desired in such a magnetic memory device.